<template>
  <div class="container">
    <div v-for="(item, index) in data" :key="index" class="info_item">
      <span><i :class="['tip',item.isCircle?'circle':'box']" :style="[{background: item.color},{borderColor:item.color}]"></i>{{ item.name }}</span>
      <span>{{ item.value }}</span>
    </div>
  </div>
</template>
<script setup>
import { defineProps } from 'vue';
const props = defineProps({
  data: {
    type: Array,
    default: () => []
  }
});
</script>
<style lang="less" scoped>
.container {
  width: 100%;
  height: 100%;
  padding: 0.625rem 1.875rem;
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  justify-content: flex-start;
  align-content: space-between;
}
.info_item {
  width: calc(50% - 1.875rem);
  height: 25%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
  overflow: hidden;
}

.name {
  position: relative;
  color: #9bd5ff;
}

.tip {
  display: inline-block;
  padding: 0.25rem;
  margin: 0 0.25rem;
}
.circle {
  border-radius: 0.25rem;
}

.box {
  border-width: 1px;
  border-style: solid;
}
</style>
